WearableExtender
Wearable extender for notification actions. To add extensions to an action, create a new NotificationCompat.Action.WearableExtender object using the WearableExtender()
constructor and apply it to a NotificationCompat.Action.Builder using extend.
NotificationCompat.Action action = new NotificationCompat.Action.Builder(
R.drawable.archive_all, "Archive all", actionIntent)
.extend(new NotificationCompat.Action.WearableExtender()
.setAvailableOffline(false))
.build();
Content copied to clipboard
Constructors
Link copied to clipboard
constructor()
Create a NotificationCompat.Action.WearableExtender with default options.
Create a NotificationCompat.Action.WearableExtender by reading wearable options present in an existing notification action.
Functions
Link copied to clipboard
Link copied to clipboard
open fun extend(@NonNull builder: NotificationCompat.Action.Builder): NotificationCompat.Action.Builder
Apply wearable extensions to a notification action that is being built.
Link copied to clipboard
Get the label to display to cancel the action.
Link copied to clipboard
Get the label to display to confirm that the action should be executed.
Link copied to clipboard
Get a hint that this Action should be displayed inline - i.e.
Link copied to clipboard
Get a hint that this Action will launch an Activity directly, telling the platform that it can generate the appropriate transitions
Link copied to clipboard
Get the label to display while the wearable is preparing to automatically execute the action.
Link copied to clipboard
Get whether this action is available when the wearable device is not connected to a companion device.
Link copied to clipboard
Set whether this action is available when the wearable device is not connected to a companion device.
Link copied to clipboard
Set a label to display to cancel the action.
Link copied to clipboard
Set a label to display to confirm that the action should be executed.
Link copied to clipboard
open fun setHintDisplayActionInline(hintDisplayInline: Boolean): NotificationCompat.Action.WearableExtender
Set a hint that this Action should be displayed inline - i.e.
Link copied to clipboard
open fun setHintLaunchesActivity(hintLaunchesActivity: Boolean): NotificationCompat.Action.WearableExtender
Set a hint that this Action will launch an Activity directly, telling the platform that it can generate the appropriate transitions.
Link copied to clipboard
open fun setInProgressLabel(@Nullable label: CharSequence): NotificationCompat.Action.WearableExtender
Set a label to display while the wearable is preparing to automatically execute the action.